Target Autolock OXP by Thargoid.

A little OXP that offers a software upgrade to the Scanner Targeting Enhancement equipment (which is of course required). This adds the functionality that if the ship is attacked by surprise, or any other situation where there is currently no target set, then the attacking ship is automatically targetted. It is also tagged red/magenta on the scanner, so you know exactly who to take your aggression out on.

The modification is designed for bounty hunters and other hard-edged combat veterans to enable swift location of the hostile craft using the Targeting Enhancement's directional arrow and/or more simple useage of missiles and other ordinance. Note that this update offers target lock not laser lock, that kind of aiming still needs to be done manually.

Also as a new addition, the currently targetted entity on your scanner will now be artifically recoloured to flashing blue/grey (or whatever you prefer, see below) to make it easier to track amongst whatever else may be around you. If you close down your target or aim at something else it will return to its original colouration.

Available from all good tech 13+ systems for the small price of 200 credits.

Requires Oolite v1.74 or above.

--------------------------------------------------------------

Note for OXP makers:

If you don't want Target Autolock to be able to lock onto your ship, just include "TAP_noAutolock" as one of the ships roles. Also if you are creating a stealth ship that does not show up on scanner and includes the "OXP_stealthShip" role in its role list, this also will not be locked on to by Autolock.

Also in both cases the ship will not be highlighted on the scanner if the player manually targets it.

--------------------------------------------------------------

Scanner colours:

If blue/cyan isn't your thing, just open the script.js file in the OXPs config folder using your preferred text editor (not Notepad under Windows!) and change the definitions of this.scanColor1 and this.scanColor2 in lines 10 & 11 of this.startUp to your preferred colours. Then save the file and restart Oolite whilst holding down the shift key until you get the spinning Cobra mkIII screen to clear the cache.

--------------------------------------------------------------

License:

This OXP is released under the Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with the following clauses:

* Whilst you are free (and encouraged) to re-use any of the scripting, models or texturing in this OXP, the usage must be distinct from that within this OXP. Unique identifiers such as (but not limited to) unique shipdata.plist entity keys, mission variables, script names (this.name), equipment identity strings (EQ_), description list arrays and entity roles must not be re-used without prior agreement. Basically if it's unique or would identify or overwrite anything in the original OXP, then you may not re-use it (for obvious compatibility reasons).
* rebundling of this OXP within another distribution is permitted as long as it is unchanged. The following derivates however are permitted and except from the above:
	* the conversion of files between XML and openStep.
	* the merging of files with other files of the same type from other OXPs.
* The license information (either as this file or merged into a larger one) must be included in the OXP.
* Even though it is not compulsory, if you are re-using any sizable or recognisable piece of this OXP, please let me know :)

--------------------------------------------------------------

Instructions:

Unzip the file, and then move the folder "Target Autolock 1.12.oxp" to the AddOns directory of your Oolite installation. Then start the game up whilst holding down the shift key (until the spinning Cobra Mk III screen appears).

--------------------------------------------------------------

Version history:

21/04/2009 - Version 1.00, Initial release.
19/08/2009 - Version 1.01, minor script tweak to deal with attacker getting destroyed before autolock.
14/04/2010 - Version 1.10, update for scanner colour marking. Now requires Oolite v1.74 or higher.
15/04/2010 - Version 1.10, added scanner colour-marking of current target.
23/06/2010 - Version 1.11, scanner colour markers now easier to change in script. Also script check for self-locking included
13/02/2011 - Version 1.12, removal of upper limit, to allow running with 1.75
